package com.showde.shoppingmall.business;

import com.showde.shoppingmall.business.NetCallbackImplBase.Notify;
import com.showde.shoppingmall.netentity.ProductEntity;
import com.showde.shoppingmall.netentity.ProductEntity.FETCHTYPE;

public class ProductBusiness extends BusinessBase {

	private String productCategoryId;
	private String productId;

	private FETCHTYPE fetchType;

	public ProductBusiness(Notify notify) {
		super(notify);
	}

	public ProductBusiness(String productCategoryId, Notify notify) {
		super(notify);
		this.productCategoryId = productCategoryId;
		prepare();
	}

	public ProductBusiness(String productId, Notify notify, FETCHTYPE fetchtype) {
		super(notify);
		this.productId = productId;
		this.fetchType = fetchtype;
		prepare1();
	}

	@Override
	public void prepare() {
		this.netEntity = new ProductEntity(this.productCategoryId);
	}

	public void prepare1() {
		this.netEntity = new ProductEntity(this.productId, fetchType);
	}

}
